<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <title>用户中心同步</title>
    <%@ include file="../include/common.jsp"%>
	<%@ include file="../include/jbox.jsp"%>
	<%@ include file="../include/table.jsp"%>
	<script type="text/javascript">
	
	  function sync(){
		  $.jBox.tip("同步中，请稍后", 'loading');
		  $.ajax({
			    type: "POST", 
			    url: "user-info!synUserInfo.action", //请求的action
				global:false,
				async:true,
			    success: function(data){ //结果
					$.jBox.tip('同步完成,本次同步用户数据：'+data+'条', 'success',{timeout: 5000});
			   }
		  });
  	  }
  	  
  	  function registry(){
  	  	 getTopWin(window).getMessageBox().tip("同步中，请稍后", 'loading');
		  $.ajax({
			    type: "POST", 
			    url: "user-info!reRegistry.action", //请求的action
				global:false,
				async:true,
			    success: function(data){ 
					window.setTimeout(function () {
							getTopWin(window).getMessageBox().tip('同步用户中心成功', 'success'); 
						},1500);
			   }
		  });
  	  }
	</script>
  </head>
  
  <body>
    <h2 class="title-h2" style="margin-top:0; "><span><img src="${pageContext.request.contextPath}/style/default/bsm/images/arrow-down.gif"/></span>同步用户</h2>
	<div style="margin-top:5px;">
	 <span><input  type="button" name="bt" id="bt" value="同步数据" title="同步用户中心数据" class="btn-4" onclick="sync();" /></span>
	 <span><input type="button" value="同步系统" onclick="registry();"  title="重新连接用户中心" class="btn-4" /> </span>
	</div>
  </body>
</html>
